package org.example.aaaatest.Switch01;


import com.taobao.csp.switchcenter.annotation.AppSwitch;
import com.taobao.csp.switchcenter.bean.Switch;
import com.taobao.csp.switchcenter.core.SwitchManager;
import com.taobao.csp.switchcenter.example.EnumType;
import com.taobao.csp.switchcenter.exception.SwitchCenterError;
import com.taobao.csp.switchcenter.exception.SwitchCenterException;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class CommonTypeSwitch {
    @AppSwitch(des = "String 类型开关", level = Switch.Level.p2)
    public static String stringSwitch = "string";
    @AppSwitch(des = "Integer 类型开关", level = Switch.Level.p1)
    public static Integer integerSwitch = 2;
    @AppSwitch(des = "Boolean 类型开关", level = Switch.Level.p4)
    public static Boolean booleanSwitch = true;
    @AppSwitch(des = "AtomicInteger 类型开关", level = Switch.Level.p1)
    public static AtomicInteger atomicIntegerSwitch = new AtomicInteger(21);
    @AppSwitch(des = "AtomicBoolean 类型开关", level = Switch.Level.p1)
    public static AtomicBoolean atomicBooleanSwitch = new AtomicBoolean(true);
    @AppSwitch(des = "AtomicLong 类型开关", level = Switch.Level.p1)
    public static AtomicLong atomicLongSwitch = new AtomicLong(4L);
    @AppSwitch(des = "泛型为 String List 类型开关", level = Switch.Level.p1)
    public static List<String> stringListSwitch = new ArrayList<String>();
    @AppSwitch(des = "泛型是<Integer, String> Map 开关", level = Switch.Level.p4)
    public static Map<Integer, String> INT_STRING_MAP = new HashMap<Integer, String>();
    @SuppressWarnings("deprecation")
    @AppSwitch(des = "Date类型开关", level = Switch.Level.p1)
    public static Date dateTypeSwitch       = new Date(114, 6, 3);
    @AppSwitch(des = "BigInteger类型开关", level = Switch.Level.p1)
    public static BigInteger bigIntegerTypeSwitch = BigInteger.valueOf(38888);
    @AppSwitch(des = "BigDecimal类型开关", level = Switch.Level.p1)
    public static BigDecimal bigDecimalTypeSwitch = BigDecimal.valueOf(3.00000000001);
    @AppSwitch(des = "枚举类型开关", level = Switch.Level.p1)
    public static EnumType enumTypeSwitch = EnumType.ITEM1;
    @AppSwitch(des = "泛型为List<Integer>的LinkedList", level = Switch.Level.p1)
    public static List<List<Integer>> LIST_INT_LINKEDLIST = new LinkedList<List<Integer>>();
    @AppSwitch(des = "泛型为<Map<String, Integer>, Map<String, Integer>>的HashMap", level = Switch.Level.p1)
    public static Map<Integer, Map<String, Map<String, Integer>>> MAP_MAP_HASHMAP = new HashMap<Integer, Map<String, Map<String, Integer>>>();
}


